package com.windy.common.header;

import feign.template.HeaderTemplate;

/**
 * Created by liyufeng on 2022/5/9
 */
public class FeignHeader implements Header {

    private HeaderTemplate header;

    public FeignHeader(HeaderTemplate header) {
        this.header = header;
    }

    @Override
    public String key() {
        return header.getName();
    }

    @Override
    public String value() {
        return header.getValues().stream().findFirst().get();
    }
}
